package com.zenchn.entity;

import java.io.Serializable;
import java.util.List;

/**
 * 区域树 对象
 *
 * @author dingxinfa
 * @date 2020-04-16
 **/
public class AreaTreeVO implements Serializable {

    private static final long serialVersionUID = -2553299384274108148L;
    private String code;

    private String parentCode;

    private String name;

    private String grade;

    private Boolean leaf;

    private List<AreaTreeVO> children;


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getParentCode() {
        return parentCode;
    }

    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public List<AreaTreeVO> getChildren() {
        return children;
    }

    public void setChildren(List<AreaTreeVO> children) {
        this.children = children;
    }

    public Boolean getLeaf() {
        return leaf;
    }

    public void setLeaf(Boolean leaf) {
        this.leaf = leaf;
    }

    public void addChild(AreaTreeVO areaTreeVO) {
        this.children.add(areaTreeVO);
    }

    @Override
    public String toString() {
        return "AreaTreeVO{" +
                "code='" + code + '\'' +
                ", parentCode='" + parentCode + '\'' +
                ", name='" + name + '\'' +
                ", grade='" + grade + '\'' +
                ", leaf=" + leaf +
                ", children=" + children +
                '}';
    }
}
